const jwt = require("jsonwebtoken");
const { JWT_CONFIG } = require("../config/index");

// 生成token
const createToken = (payload) => {
  return jwt.sign(payload, JWT_CONFIG.secret, {
    expiresIn: JWT_CONFIG.expiresIn,
  });
};


module.exports = { createToken };
